<?php

namespace app\api\controller;

use think\Controller;

class Sign extends Controller
{
    //我要报名
    public function sign()
    {
        if (request()->isPost()){
            $data = input('post.');
            $result= model('common/Sign') -> sign_add($data);
            if ($result == 1){
                return json(['code'=>100,'msg'=>'提交成功！']);
            } else {
                return json(['code'=>404,'msg'=>'提交失败！','error'=>$result]);
            }
        } else {
            return json(['code'=>500,'msg'=>'非法请求']);
        }
    }


}
